package com.mes.basicdata.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.data.provider.Page;
import com.mes.basicdata.dao.iface.IResourceAggregateDao;
import com.mes.basicdata.domain.Operation;
import com.mes.basicdata.domain.ResourceAggregate;
import com.mes.common.service.BasicService;
@Service
public class ResourceAggregateService extends BasicService<ResourceAggregate> {
	@Autowired IResourceAggregateDao resourceAggregateDao;
	
	@DataProvider
    public void getResourceByConditions(Page<ResourceAggregate> page, Map<String, Object> params){
    	if (params != null && !params.equals("") ){
    		try {
    			resourceAggregateDao.getResourceByConditions(page, params);
    			System.out.println("");
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}else {
			try {
				//this.getAll(page);
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
    }
}
